﻿/**
 * @author sminutoli
 */
import com.dinmax.flash.draw.layout.*
import com.dinmax.flash.draw.cabeza.*

class WindowCabezaLayout
implements Layout {
	
	private var window:WindowCabeza;
	private var rows:Number;
	private var cols:Number=1;
	private var hSep:Number=0;
	private var vSep:Number=5;
	
	public function WindowCabezaLayout(window:WindowCabeza) {
		this.setWindow(window);
	};
	
	//LAYOUT
	function layout():Void{
		//trace("WindowCabezaLayout.as | layout");
		var items:Array = this.getWindow().getItems();
		//trace("items to layout: "+items);
		var delta:Number = 0;
		for (var i : Number = 0; i < items.length; i++) {
			var clip:MovieClip = items[i];
			clip._y = delta;
			delta += clip._height + vSep;
		}
	};
	//
	
	public function getWindow():WindowCabeza {
		return window;
	}

	public function setWindow(window:WindowCabeza):Void {
		this.window = window;
	}

	public function getHSep():Number {
		return hSep;
	}

	public function setHSep(hSep:Number):Void {
		this.hSep = hSep;
	}

	public function getVSep():Number {
		return vSep;
	}

	public function setVSep(vSep:Number):Void {
		this.vSep = vSep;
	}

	public function getCols():Number {
		return cols;
	}

	public function setCols(cols:Number):Void {
		this.cols = cols;
	}

	public function getRows():Number {
		return rows;
	}

	public function setRows(rows:Number):Void {
		this.rows = rows;
	}

}